package com.algorithm.cjm.test;

/**
 * Created by jieming.chen on 2020/1/30
 */
public class DoTest1 {
    public static void main(String[] args) {
        int a,b,c,d;
        for (a = 1; a <= 9; a++) {
            for (b = 0; b <= 9; b++) {
                for (c = 0; c <= 9; c++) {
                    for (d = 1; d <= 9; d++) {
                        int temp = d * (int)Math.pow(10.0,5.0) + d * (int)Math.pow(10.0,4.0) + d * (int)Math.pow(10.0,3.0) + d * (int)Math.pow(10.0,2.0) + d * 10 + d;
                        int temp1 = a * a * (int)Math.pow(10.0,4.0) + a * b * (int)Math.pow(10.0,3.0) + a * c * (int)Math.pow(10.0,2.0) + a * a * 10 + a * b;
                        if (temp == temp1) {
                            System.out.println("a:" + a + "   b:" + b + "  c:" + c + "  d:" + d);
                        }
                    }
                }
            }
        }
    }
}
